package com.yrj.shopping;

public class Goods {
    //名称，种类，价格，数量
    private String name;
    private String kind;
    private int price;
    private int number;
    public Goods() {}
    public Goods(String name, String kind, int price, int number) {
        this.name = name;
        this.kind = kind;
        this.price = price;
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getKind() {
        return kind;
    }

    public void setKind(String kind) {
        this.kind = kind;
    }

    public int getPrice() {
        return price;
    }

    public void setPrice(int price) {
        this.price = price;
    }

    public int getNumber() {
        return number;
    }

    public void setNumber(int number) {
        this.number = number;
    }

    public void getgoods1(){

        System.out.printf("商品名：%s 商品种类：%s 商品价格：%d", name, kind, price);
        System.out.println();
    }
    public void getgoods2(){

        System.out.printf("商品名：%s 商品种类：%s 商品价格：%d 商品数量：%d", name, kind, price, number);
        System.out.println();
    }

}

